home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / sa-book.zip / Makefile.local < prev    next >
Makefile  |  1989-09-27  |  2KB  |  66 lines

  1.  
  2. #Makefile for saving and restoring local files embedded in the system.  Makes 
  3. #upgrading the operating system less painful, with fewer forgotten files.
  4. #
  5. #It is not intended that the restore be fully automated, but rather that the 
  6. #names of the files remind the installer of what to do.  
  7. #
  8. #Note - you should run "make password" and then reinstall the old passwd file 
  9. #before running "make restore" so that things are owned by the right uid.
  10. #
  11. #This particular Makefile.localsys is from a Sun 3.3 file server.
  12. #
  13.  
  14. TAPE = /dev/rst0
  15. TAR = tar
  16. TAROPTIONS = cvf
  17. RESTOREDIR = /usr/localsys
  18.  
  19. # These lists of files need to be modified to suit local conditions 
  20. ROOT = {.profile,.emacs_pro,.login,.logout,.cshrc,.rhosts,.rootmenu,.defaults,Makefile.localsys}
  21.  
  22. PRIVATEUSR = {adm/acct,adm/aculog,adm/lastlog,adm/newsyslog,adm/savacct,adm/usracct,\
  23.               adm/wtmp,lib/crontab,preserve,spool}
  24.  
  25. ETC = {hosts.equiv,remote,motd,servers,services,dumpdates,nd.local,syslog.conf,hosts,ethers, \
  26.        netgroup,syslog.pid,exports,networks,ttys,ttytype,passwd,fstab,fstab.clients,printcap, \
  27.        protocols,gettytab,group,rc,rc.boot,rc.local,rc.local.clients,rc.clients}
  28.  
  29. USRETC = {cohorts,termcap}
  30.  
  31. USRLIB = {Mail.rc,Mailrc,aliases,aliases.dir,aliases.pag,bmac,font/dev240,font/dev300,\
  32.           font/devpsc,font/ft[RIBS],sendmail.cf,tmac/tmac.an,tmac/tmac.m}
  33.  
  34. SRCS = {new,sun,ucb}
  35.  
  36. USRSYS = {conf/ANCHOR,conf/BEERS,conf/ANCHOR.2swap}
  37.  
  38. USR = {local,new}
  39.  
  40. USRMAN = {manl}
  41.  
  42. # Type "make tape" to make a tape of all the local system files
  43. tape: fake
  44.     csh -c 'cd /; $(TAR) $(TAROPTIONS) - ./$(ROOT)  ./private/usr/$(PRIVATEUSR)\
  45.         ./etc/$(ETC) ./usr/etc/$(USRETC) ./usr/lib/$(USRLIB) ./usr/src/$(SRCS)\
  46.     ./usr/man/$(USRMAN) ./usr/sys/$(USRSYS) | (cd /tools/anchor/localsys.bak; tar xf - )'
  47.  
  48.  
  49. # Type "make localtape" to make a tape of all /usr/local and /usr/new 
  50. localtape: fake
  51.     csh -c 'cd /; $(TAR) $(TAROPTIONS) - ./usr/$(USR) | anchor dd of=$(TAPE)'
  52. password: fake
  53.     cd /$(RESTOREDIR); $(TAR) xf $(TAPE) ./etc/passwd
  54.     csh -c 'echo "You need to install /$(RESTOREDIR)/etc/passwd"'
  55.  
  56. # Type "make restore" to restore from the tape.  Should make passwd first
  57. restore: fake
  58.     cd /$(RESTOREDIR); $(TAR) xf $(TAPE);
  59.  
  60.  
  61. fake:
  62. #    This makefile needs to be smart and needs to remind
  63. #    humans, rather than automate everything, so changes 
  64. #    in new releases will not be ignored or done wrong.
  65. #
  66.